<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="vehiculolist.title"/></title>
    <meta name="heading" content="<fmt:message key='vehiculolist.heading'/>"/>    
</head>

<form:form id="vehiculoform" name="vehiculoform" 
	commandName="vehiculoform" action="vehiculolist.html?search=list">

<c:set var="buttons">
    <input type="button" class="button" 
        onclick="location.href='<c:url value="/vehiculo/vehiculoform.html?method=Add&from=list"/>'"
        value="<fmt:message key="button.add"/>"/>
        
    <input type="button" class="button" 
    	onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<ul>
	<li>
	<label class="desc"><fmt:message key="common.filtros.busqueda"/></label>
	<div class="group" style="width: 300px">
	
		<div>
	     	<fmt:message key="common.placa"/><br/>
			<form:input path="dePlaca" id="dePlaca" cssClass="text medium" maxlength="50"/>
	    </div><br/>
	     
	    <div>
	     	<fmt:message key="common.modelo"/><br/>
			<form:input path="deModelo" id="deModelo" cssClass="text medium" maxlength="100"/>
	    </div><br/>
		
		<div>
			<fmt:message key="common.tipo.vehiculo"/><br/>
	        <form:select path="clpbTipoVehiculo.id" id="coTipoVehiculoID" cssClass="text mediumlarge">
	        	<option value="-1">
	        		<fmt:message key="label.itemdefault"/>
	        	</option>
	        	<c:forEach var="bntipovehiculo" items="${tiposvehiculos}">
	        		<option value="${bntipovehiculo.id}">
	        			${bntipovehiculo.deTipoVehiculo}
	        		</option>
	        	</c:forEach>
	       	</form:select>
		</div><br/><br/>
	     
	    <div> 					
			<input type="submit" class="button" value="<fmt:message key="button.search"/>"/>			
	 	</div>
	</div>	
	</li>
</ul>

<c:out value="${buttons}" escapeXml="false" /><br/>

<display:table name="vehiculos" cellspacing="0" cellpadding="0" requestURI="" 
    defaultsort="1" id="bnvehiculo" pagesize="30" class="table" export="true" style="width: 1000px" >
    
		    <display:column property="dePlaca" titleKey="common.placa" escapeXml="true" sortable="true"
		    url="/vehiculo/vehiculoform.html?from=list" paramId="id" paramProperty="id"/>
		    <display:column property="deModelo" titleKey="common.modelo" escapeXml="true" sortable="true"/>
		    <display:column property="deTipoVehiculo" titleKey="common.tipo.vehiculo" escapeXml="true" sortable="true" />
		    		    	
		    		         
    <display:setProperty name="paging.banner.item_name" value="registro"/>
    <display:setProperty name="paging.banner.items_name" value="registros"/>

    <display:setProperty name="export.excel.filename" value="Vehiculos.xls"/>
    <display:setProperty name="export.pdf.filename" value="Vehiculos.pdf"/>
</display:table>

<br/><c:out value="${buttons}" escapeXml="false" />
</form:form>